Fix to gtkstatusicon.c to allow building both X11 and Quartz backends
authorBrion Vibber <brion@pobox.com>
Wed, 22 Oct 2014 12:36:23 +0000 (05:36 -0700)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 23 Oct 2014 02:56:51 +0000 (22:56 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=739005

gtk/deprecated/gtkstatusicon.c

index 97995d54ab7f9d4e9d92783e2d8fba1048c866d0..1fdb9d1772ca514731053abade02f91a916e8b75 100644 (file)
@@ -2599,8 +2599,6 @@ gtk_status_icon_set_tooltip_markup (GtkStatusIcon *status_icon,
 {
 #ifdef GDK_WINDOWING_X11
   GtkStatusIconPrivate *priv;
-#else
-  gchar *text = NULL;
 #endif
 
   g_return_if_fail (GTK_IS_STATUS_ICON (status_icon));
@@ -2612,12 +2610,14 @@ gtk_status_icon_set_tooltip_markup (GtkStatusIcon *status_icon,
     gtk_widget_set_tooltip_markup (priv->tray_icon, markup);
 #endif
 #ifdef GDK_WINDOWING_WIN32
+  gchar *text = NULL;
   if (markup)
     pango_parse_markup (markup, -1, 0, NULL, &text, NULL, NULL);
   gtk_status_icon_set_tooltip_text (status_icon, text);
   g_free (text);
 #endif
 #ifdef GDK_WINDOWING_QUARTZ
+  gchar *text = NULL;
   if (markup)
     pango_parse_markup (markup, -1, 0, NULL, &text, NULL, NULL);
   gtk_status_icon_set_tooltip_text (status_icon, text);